# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=libchewing
pkgver=0.5.1
pkgrel=0
pkgdesc="Intelligent Chinese phonetic input method"
url="http://chewing.im/"
arch="all"
license="LGPL-2.1-only"
makedepends="sqlite-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/chewing/libchewing/releases/download/v$pkgver/libchewing-$pkgver.tar.bz2"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	# parallel testing is broken (https://github.com/chewing/libchewing/issues/293)
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="a6551661bb5e56bba59730b93b373db56af7d42f2ab4881fbfff8727689dd2604d42d2e5c0b04820df66a431dfb5fcb73cc5c9b538615da76198ee3635501c1f  libchewing-0.5.1.tar.bz2"
